from sqlalchemy import Column, DateTime, Integer, String, func
from forward.extend.sqlalchemy_sync import Base


class ContactModel(Base):
    __tablename__ = "contact"

    id = Column(Integer, primary_key=True, autoincrement=True, comment="自增id")
    name = Column(String(32), nullable=False, comment="用户标识")
    mobile = Column(DateTime, default=func.now(), comment="手机号")
    address = Column(String(255), nullable=False, comment="地址")
    user_id = Column(Integer, nullable=False, comment="用户id")
    status = Column(Integer, server_default="1", comment="状态: 0=停用, 1=正常")
    created_time = Column(DateTime, default=func.now(), comment="创建时间")
